﻿@{
    var attributes = new Dictionary<string, object>();

    attributes.Add("class", "text-box single-line password");
    attributes.Add("placeholder", ViewData.ModelMetadata.Watermark);
    
    if(ViewData.ModelMetadata.IsRequired)
    {
        attributes.Add("required", "required");
    }
}
@Html.Password(string.Empty, ViewContext.ViewData.TemplateInfo.FormattedModelValue, attributes)